﻿Shader "TestShader2"
{
Properties
{
 	_EmissiveColor("Emissive Color",Color)=(1,1,1,1)
 	_AmbientColor("Ambient Color",Color)=(1,1,1,1)
 	_MySliderValue("Slider",Range(0,10))=2.5
}
	SubShader{
		Tags {"RenderType"="Opaque"}
		LOD 200
		CGPROGRAM
		#pragma surface surf Mylight


		float4 _EmissiveColor;
		float4 _AmbientColor;
		float _MySliderValue;

		struct Input
		{
		float2 uv_MainTex;
		};

		inline float4 LightingMylight(SurfaceOutput s ,fixed3 lightdir,fixed atten)
		{
		float diflight=max(0,dot(s.Normal,lightdir));
		float4 col;
		col.rgb=s.Albedo*_LightColor0.rgb*(diflight*atten*2);
		col.a=s.Alpha;
		return col;
		}
		 
		void surf (Input IN, inout SurfaceOutput o){
		float4 c=pow((_EmissiveColor+_AmbientColor),_MySliderValue);
		o.Albedo=c.rgb;
		o.Alpha=c.a;
		}
		ENDCG
	}
	FallBack "Diffuse"
}